package com.ziyia.viewmodel;

import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;

import org.jetbrains.annotations.NotNull;

public class MainViewModelFactory implements ViewModelProvider.Factory {
    private Integer i = null;

    public MainViewModelFactory(Integer i) {
        this.i = i;
    }


    @NonNull
    @Override
    public <T extends ViewModel> T create(@NonNull @NotNull Class<T> modelClass) {
        return (T) new MainViewModel(i);
    }
}
